package cn.crsc.openlookeng.adhoc.query;

import cn.crsc.openlookeng.adhoc.dataframe.PagedDataFrame;
import cn.crsc.openlookeng.adhoc.jdbc.QueryObject;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

public interface QueryService {
    //执行查询 返回值类型 为 map 和 DataFrame
    Map<String, Object> executeQuery(QueryObject queryObject) throws  Exception;

    PagedDataFrame executeDataFrame(QueryObject queryObject) throws  Exception;

    //获取schemas
    List<String> getSchemas(QueryObject queryObject) throws Exception;

    //获取tables
    List<String> getTables(QueryObject queryObject) throws SQLException;

    //获取表详情
    Map<String, String> getTableInfo(QueryObject queryObject) throws SQLException;

    Object executeQueryForEntity(QueryObject queryObject, Class clazz, Class parameterizedType);
}
